package com.iv.durian.cloud.service;

import com.iv.durian.cloud.Content;
import com.iv.durian.cloud.Coverage;
import com.iv.durian.cloud.dao.CoverageDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by LiuLin on 2018/6/30 0030.
 */
@Service
public class CoverageService {

    @Autowired
    CoverageDao coverageDao;
    public List<Coverage> list(Integer type) {
        return coverageDao.list(type);
    }

    public Coverage get(Integer coverageId) {
        return coverageDao.get(coverageId);
    }

    public void add(Coverage coverage) {
        coverageDao.add(coverage);
    }

    public int remove(Integer coverageId) {
        return coverageDao.remove(coverageId);
    }

    public int count(Integer type) {
        return coverageDao.count(type);
    }

    public void update(Coverage coverage) {
        coverageDao.update(coverage);
    }

    public Content getContent(Integer coverageId) {
        return coverageDao.getContent(coverageId);
    }

    public void updateContent(Content content){
        coverageDao.updateContent(content);
    }
}
